<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<input type="text"/><br/>
<input type="text"/><br/>
<input type="text"/><br/>
<input type="text"/><br/>
<input type="text"/><br/>
<input type="text"/><br/>
<input type="text"/><br/>
<script>
    var inputs=document.getElementsByTagName("input");
    for (var i=0;i<inputs.length;i++){
        var input=inputs[i];
        input.onkeyup=function(e){
            e=e||window.event;
            console.log(e.keyCode)
            if(e.keyCode==32){
                this.nextElementSibling.nextElementSibling.focus();
            }
        }
    }
</script>
</body>
</html>